<form class="layui-form layui-form-pane edit-form">
    <div class="layui-form-item">
        <label class="layui-form-label">
            父级菜单
        </label>
        <div class="layui-input-block">
            <select lay-verify="required" name="parent_id">
                {foreach $parent_ids as $k=>$v}
                {if $k == $data['parent_id']}
                <option selected="selected" value="{$k}">
                    {$v}
                </option>
                {else}
                <option value="{$k}">
                    {$v}
                </option>
                {/if}
                {/foreach}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            所属模块
        </label>
        <div class="layui-input-block">
            <select lay-verify="required" name="module">
                {foreach $modules as $k=>$v}
                {if $k == $data['module']}
                <option selected="selected" value="{$k}">
                    {$v}
                </option>
                {else}
                <option value="{$k}">
                    {$v}
                </option>
                {/if}
                {/foreach}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            菜单名称
        </label>
        <div class="layui-input-block">
            <input autocomplete="off" class="layui-input" lay-verify="required" name="name" type="text" value="{$data['name']}"/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            访问路径
        </label>
        <div class="layui-input-block">
            <select lay-search="" name="route">
                <option value="">
                    顶级菜单可留空
                </option>
                {foreach $routes as $v}
                {if $v == $data['route']}
                <option selected="" value="{$v}">
                    {$v}
                </option>
                {else}
                <option value="{$v}">
                    {$v}
                </option>
                {/if}
                {/foreach}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            图标
        </label>
        <div class="layui-input-inline">
            <input autocomplete="off" class="layui-input" name="icon" type="text" value="{$data['icon']}"/>
        </div>
        <div class="layui-form-mid layui-word-aux">
            <a href="http://fontawesome.dashgame.com/" target="_blank">
                font-awesome图标
            </a>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            排序
        </label>
        <div class="layui-input-block">
            <input autocomplete="off" class="layui-input" name="sort" type="text" value="{$data['sort']}"/>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-filter="editform" lay-submit="">
                保存
            </button>
            <button class="layui-btn layui-btn-primary layui-btn-cancel" type="button">
                取消
            </button>
        </div>
    </div>
</form>
